import {getClassStudent} from '@/services'
import {makeAutoObservable} from 'mobx'
import {IAddPlanList} from '@/utils/interface'

class addPlan{
    constructor(){
        makeAutoObservable(this)
    }

    num=0
    islook:boolean=false
    list:string[]=[]
    newaddPlanList:IAddPlanList[]=[]
    addPlanList:IAddPlanList[]=[]
    CheckAll:boolean=false
    isMove:boolean=false
    dist:string=''
    async getClassStudent(){
        const result=await getClassStudent()
        if(result.data){
            const addPlanList=result.data.map((item:IAddPlanList)=>{
                return {...item,flag:this.CheckAll,isMove:this.isMove,dist:this.dist,avatar:'http://111.203.59.61:8060'+item.avatar}
            })
            this.addPlanList=addPlanList
        }
    }
}

export default new addPlan;